{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "215a957c",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Python3_Jupyter_Nb_Pandas_Excel数据调整.ipynb\n",
    "# Create By GF 2023-12-15 15:13"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "ef80a529",
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "2c3b26bc-00db-42e3-a030-ff5b1c8ba5a6",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 集团“1+5”精英突击前后对比表（历史） - Excel数据调整。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "f4c390e2-7b55-4a4c-8036-c4c05dc078e7",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_excel(\"C:\\\\GF-Datas\\\\集团1and5精英突击前后对比表(历史)-改.xlsx\", sheet_name=\"sheet1\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "e435152e-12ef-41f8-b154-d1644ddfd00a",
   "metadata": {},
   "outputs": [],
   "source": [
    "def PdFunc_Datetime_Format(Value:object, Format:str):\n",
    "    if type(Value) is datetime.datetime:\n",
    "        return Value.strftime(Format)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "005df9dc-ea64-4a1f-9ff2-fd7f4af8e22d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['部门', '门店简称', '门店类别', '突击时间', '开始日期', '结束日期', '突击天数', '队长', '门店全称',\n",
       "       '项目', '突击中日均(平时)', '突击中日均(周末)', '突击中日均(日均)', '突击前日均\\t\\t(平时)',\n",
       "       '突击前日均\\t\\t(周末)', '突击前日均\\t\\t(日均)', '实际增长', '相对增长', '相对涨幅', '门店涨幅',\n",
       "       '体系突击前', '体系突击后', '大盘涨幅', '体系突击前(所有门店)', '体系突击后(所有门店)'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = df.rename(columns={\"门店\":\"门店简称\", \"门店.1\":\"门店全称\"})\n",
    "# --------------------------------------------------\n",
    "df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "75bcfcbc-b24d-461a-b3cc-47699c4480bf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['部门', '门店简称', '门店类别', '突击时间', '开始日期', '结束日期', '突击天数', '队长', '门店全称',\n",
       "       '项目', '突击中日均(平时)', '突击中日均(周末)', '突击中日均(日均)', '突击前日均(平时)', '突击前日均(周末)',\n",
       "       '突击前日均(日均)', '实际增长', '相对增长', '相对涨幅', '门店涨幅', '体系突击前', '体系突击后', '大盘涨幅',\n",
       "       '体系突击前(所有门店)', '体系突击后(所有门店)'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ColsName = df.columns.values.tolist()\n",
    "# --------------------------------------------------\n",
    "for i in range(0, len(ColsName)):\n",
    "    ColsName[i] = ColsName[i].replace(\"\\t\", str(''))\n",
    "# --------------------------------------------------\n",
    "df.columns = ColsName\n",
    "# --------------------------------------------------\n",
    "df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "fe8cd664-52d5-44ce-b6c5-3e49e0ce5091",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>部门</th>\n",
       "      <th>门店简称</th>\n",
       "      <th>门店类别</th>\n",
       "      <th>突击时间</th>\n",
       "      <th>开始日期</th>\n",
       "      <th>结束日期</th>\n",
       "      <th>突击天数</th>\n",
       "      <th>队长</th>\n",
       "      <th>门店全称</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>总裁办</td>\n",
       "      <td>双流万达苹果</td>\n",
       "      <td>A</td>\n",
       "      <td>2.8-2.16</td>\n",
       "      <td>2023-02-08 00:00:00</td>\n",
       "      <td>2023-02-16 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>罗江波</td>\n",
       "      <td>四川双流万达形象店</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>总裁办</td>\n",
       "      <td>双流万达苹果</td>\n",
       "      <td>A</td>\n",
       "      <td>2.8-2.16</td>\n",
       "      <td>2023-02-08 00:00:00</td>\n",
       "      <td>2023-02-16 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>罗江波</td>\n",
       "      <td>四川双流万达形象店</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>总裁办</td>\n",
       "      <td>双流万达苹果</td>\n",
       "      <td>A</td>\n",
       "      <td>7.29-8.6</td>\n",
       "      <td>2023-07-29 00:00:00</td>\n",
       "      <td>2023-08-06 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>鲜季</td>\n",
       "      <td>四川双流万达形象店</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>总裁办</td>\n",
       "      <td>双流万达苹果</td>\n",
       "      <td>A</td>\n",
       "      <td>7.29-8.6</td>\n",
       "      <td>2023-07-29 00:00:00</td>\n",
       "      <td>2023-08-06 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>鲜季</td>\n",
       "      <td>四川双流万达形象店</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>总裁办</td>\n",
       "      <td>温江大南街苹果</td>\n",
       "      <td>A</td>\n",
       "      <td>2.8-2.16</td>\n",
       "      <td>2023-02-08 00:00:00</td>\n",
       "      <td>2023-02-16 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>王海林</td>\n",
       "      <td>四川温江大南街形象店</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1079</th>\n",
       "      <td>三中心</td>\n",
       "      <td>成都高升桥二苹果</td>\n",
       "      <td>B2</td>\n",
       "      <td>11.1-11.8</td>\n",
       "      <td>2023-11-01 00:00:00</td>\n",
       "      <td>2023-11-08 00:00:00</td>\n",
       "      <td>8</td>\n",
       "      <td>孙学波</td>\n",
       "      <td>四川成都高升桥形象二店</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1080</th>\n",
       "      <td>三中心</td>\n",
       "      <td>贵阳白云苹果</td>\n",
       "      <td>A+1</td>\n",
       "      <td>11.22-11.30</td>\n",
       "      <td>2023-11-22 00:00:00</td>\n",
       "      <td>2023-11-30 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>黄瑞</td>\n",
       "      <td>贵州贵阳白云形象店</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1081</th>\n",
       "      <td>三中心</td>\n",
       "      <td>贵阳白云苹果</td>\n",
       "      <td>A+1</td>\n",
       "      <td>11.22-11.30</td>\n",
       "      <td>2023-11-22 00:00:00</td>\n",
       "      <td>2023-11-30 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>黄瑞</td>\n",
       "      <td>贵州贵阳白云形象店</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1082</th>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1083</th>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1084 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            部门      门店简称      门店类别         突击时间                 开始日期  \\\n",
       "0          总裁办    双流万达苹果         A     2.8-2.16  2023-02-08 00:00:00   \n",
       "1          总裁办    双流万达苹果         A     2.8-2.16  2023-02-08 00:00:00   \n",
       "2          总裁办    双流万达苹果         A     7.29-8.6  2023-07-29 00:00:00   \n",
       "3          总裁办    双流万达苹果         A     7.29-8.6  2023-07-29 00:00:00   \n",
       "4          总裁办   温江大南街苹果         A     2.8-2.16  2023-02-08 00:00:00   \n",
       "...        ...       ...       ...          ...                  ...   \n",
       "1079       三中心  成都高升桥二苹果        B2    11.1-11.8  2023-11-01 00:00:00   \n",
       "1080       三中心    贵阳白云苹果       A+1  11.22-11.30  2023-11-22 00:00:00   \n",
       "1081       三中心    贵阳白云苹果       A+1  11.22-11.30  2023-11-22 00:00:00   \n",
       "1082  三中心小计28家  三中心小计28家  三中心小计28家     三中心小计28家             三中心小计28家   \n",
       "1083  三中心小计28家  三中心小计28家  三中心小计28家     三中心小计28家             三中心小计28家   \n",
       "\n",
       "                     结束日期      突击天数        队长         门店全称  \n",
       "0     2023-02-16 00:00:00         9       罗江波    四川双流万达形象店  \n",
       "1     2023-02-16 00:00:00         9       罗江波    四川双流万达形象店  \n",
       "2     2023-08-06 00:00:00         9        鲜季    四川双流万达形象店  \n",
       "3     2023-08-06 00:00:00         9        鲜季    四川双流万达形象店  \n",
       "4     2023-02-16 00:00:00         9       王海林   四川温江大南街形象店  \n",
       "...                   ...       ...       ...          ...  \n",
       "1079  2023-11-08 00:00:00         8       孙学波  四川成都高升桥形象二店  \n",
       "1080  2023-11-30 00:00:00         9        黄瑞    贵州贵阳白云形象店  \n",
       "1081  2023-11-30 00:00:00         9        黄瑞    贵州贵阳白云形象店  \n",
       "1082             三中心小计28家  三中心小计28家  三中心小计28家     三中心小计28家  \n",
       "1083             三中心小计28家  三中心小计28家  三中心小计28家     三中心小计28家  \n",
       "\n",
       "[1084 rows x 9 columns]"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_1 = df[['部门', '门店简称', '门店类别', '突击时间', '开始日期', '结束日期', '突击天数', '队长', '门店全称']]\n",
    "# --------------------------------------------------\n",
    "df_1 = df_1.fillna(method=\"ffill\")\n",
    "# --------------------------------------------------\n",
    "df_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "1e7570b3-d78e-4f88-b937-f1710334946c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>部门</th>\n",
       "      <th>门店简称</th>\n",
       "      <th>门店类别</th>\n",
       "      <th>突击时间</th>\n",
       "      <th>开始日期</th>\n",
       "      <th>结束日期</th>\n",
       "      <th>突击天数</th>\n",
       "      <th>队长</th>\n",
       "      <th>门店全称</th>\n",
       "      <th>项目</th>\n",
       "      <th>...</th>\n",
       "      <th>突击前日均(日均)</th>\n",
       "      <th>实际增长</th>\n",
       "      <th>相对增长</th>\n",
       "      <th>相对涨幅</th>\n",
       "      <th>门店涨幅</th>\n",
       "      <th>体系突击前</th>\n",
       "      <th>体系突击后</th>\n",
       "      <th>大盘涨幅</th>\n",
       "      <th>体系突击前(所有门店)</th>\n",
       "      <th>体系突击后(所有门店)</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>总裁办</td>\n",
       "      <td>双流万达苹果</td>\n",
       "      <td>A</td>\n",
       "      <td>2.8-2.16</td>\n",
       "      <td>2023-02-08 00:00:00</td>\n",
       "      <td>2023-02-16 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>罗江波</td>\n",
       "      <td>四川双流万达形象店</td>\n",
       "      <td>主机</td>\n",
       "      <td>...</td>\n",
       "      <td>7.0508</td>\n",
       "      <td>0.6159</td>\n",
       "      <td>0.485385</td>\n",
       "      <td>0.068841</td>\n",
       "      <td>0.087352</td>\n",
       "      <td>7.274237e+02</td>\n",
       "      <td>7.408888e+02</td>\n",
       "      <td>0.018511</td>\n",
       "      <td>7.274237e+02</td>\n",
       "      <td>7.408888e+02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>总裁办</td>\n",
       "      <td>双流万达苹果</td>\n",
       "      <td>A</td>\n",
       "      <td>2.8-2.16</td>\n",
       "      <td>2023-02-08 00:00:00</td>\n",
       "      <td>2023-02-16 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>罗江波</td>\n",
       "      <td>四川双流万达形象店</td>\n",
       "      <td>毛利</td>\n",
       "      <td>...</td>\n",
       "      <td>13256.3295</td>\n",
       "      <td>-195.6278</td>\n",
       "      <td>-564.640093</td>\n",
       "      <td>-0.042594</td>\n",
       "      <td>-0.014757</td>\n",
       "      <td>1.268725e+06</td>\n",
       "      <td>1.304042e+06</td>\n",
       "      <td>0.027837</td>\n",
       "      <td>1.268725e+06</td>\n",
       "      <td>1.304042e+06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>总裁办</td>\n",
       "      <td>双流万达苹果</td>\n",
       "      <td>A</td>\n",
       "      <td>7.29-8.6</td>\n",
       "      <td>2023-07-29 00:00:00</td>\n",
       "      <td>2023-08-06 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>鲜季</td>\n",
       "      <td>四川双流万达形象店</td>\n",
       "      <td>主机</td>\n",
       "      <td>...</td>\n",
       "      <td>6.3372</td>\n",
       "      <td>1.4406</td>\n",
       "      <td>1.374492</td>\n",
       "      <td>0.216893</td>\n",
       "      <td>0.227324</td>\n",
       "      <td>8.305581e+02</td>\n",
       "      <td>8.392222e+02</td>\n",
       "      <td>0.010432</td>\n",
       "      <td>8.305581e+02</td>\n",
       "      <td>8.392222e+02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>总裁办</td>\n",
       "      <td>双流万达苹果</td>\n",
       "      <td>A</td>\n",
       "      <td>7.29-8.6</td>\n",
       "      <td>2023-07-29 00:00:00</td>\n",
       "      <td>2023-08-06 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>鲜季</td>\n",
       "      <td>四川双流万达形象店</td>\n",
       "      <td>毛利</td>\n",
       "      <td>...</td>\n",
       "      <td>12003.2374</td>\n",
       "      <td>7190.4530</td>\n",
       "      <td>7131.790956</td>\n",
       "      <td>0.594156</td>\n",
       "      <td>0.599043</td>\n",
       "      <td>1.552778e+06</td>\n",
       "      <td>1.560367e+06</td>\n",
       "      <td>0.004887</td>\n",
       "      <td>1.552778e+06</td>\n",
       "      <td>1.560367e+06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>总裁办</td>\n",
       "      <td>温江大南街苹果</td>\n",
       "      <td>A</td>\n",
       "      <td>2.8-2.16</td>\n",
       "      <td>2023-02-08 00:00:00</td>\n",
       "      <td>2023-02-16 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>王海林</td>\n",
       "      <td>四川温江大南街形象店</td>\n",
       "      <td>主机</td>\n",
       "      <td>...</td>\n",
       "      <td>6.8814</td>\n",
       "      <td>-0.5481</td>\n",
       "      <td>-0.675479</td>\n",
       "      <td>-0.098160</td>\n",
       "      <td>-0.079649</td>\n",
       "      <td>7.274237e+02</td>\n",
       "      <td>7.408888e+02</td>\n",
       "      <td>0.018511</td>\n",
       "      <td>7.274237e+02</td>\n",
       "      <td>7.408888e+02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1079</th>\n",
       "      <td>三中心</td>\n",
       "      <td>成都高升桥二苹果</td>\n",
       "      <td>B2</td>\n",
       "      <td>11.1-11.8</td>\n",
       "      <td>2023-11-01 00:00:00</td>\n",
       "      <td>2023-11-08 00:00:00</td>\n",
       "      <td>8</td>\n",
       "      <td>孙学波</td>\n",
       "      <td>四川成都高升桥形象二店</td>\n",
       "      <td>毛利</td>\n",
       "      <td>...</td>\n",
       "      <td>10722.4671</td>\n",
       "      <td>5755.9742</td>\n",
       "      <td>6850.187607</td>\n",
       "      <td>0.638863</td>\n",
       "      <td>0.536814</td>\n",
       "      <td>1.447695e+06</td>\n",
       "      <td>1.299960e+06</td>\n",
       "      <td>-0.102049</td>\n",
       "      <td>1.447695e+06</td>\n",
       "      <td>1.299960e+06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1080</th>\n",
       "      <td>三中心</td>\n",
       "      <td>贵阳白云苹果</td>\n",
       "      <td>A+1</td>\n",
       "      <td>11.22-11.30</td>\n",
       "      <td>2023-11-22 00:00:00</td>\n",
       "      <td>2023-11-30 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>黄瑞</td>\n",
       "      <td>贵州贵阳白云形象店</td>\n",
       "      <td>主机</td>\n",
       "      <td>...</td>\n",
       "      <td>9.3099</td>\n",
       "      <td>-1.5321</td>\n",
       "      <td>-0.618798</td>\n",
       "      <td>-0.066467</td>\n",
       "      <td>-0.164567</td>\n",
       "      <td>7.512535e+02</td>\n",
       "      <td>6.775555e+02</td>\n",
       "      <td>-0.098100</td>\n",
       "      <td>7.512535e+02</td>\n",
       "      <td>6.775555e+02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1081</th>\n",
       "      <td>三中心</td>\n",
       "      <td>贵阳白云苹果</td>\n",
       "      <td>A+1</td>\n",
       "      <td>11.22-11.30</td>\n",
       "      <td>2023-11-22 00:00:00</td>\n",
       "      <td>2023-11-30 00:00:00</td>\n",
       "      <td>9</td>\n",
       "      <td>黄瑞</td>\n",
       "      <td>贵州贵阳白云形象店</td>\n",
       "      <td>毛利</td>\n",
       "      <td>...</td>\n",
       "      <td>16284.2056</td>\n",
       "      <td>8076.7582</td>\n",
       "      <td>9512.799651</td>\n",
       "      <td>0.584173</td>\n",
       "      <td>0.495987</td>\n",
       "      <td>1.485960e+06</td>\n",
       "      <td>1.354918e+06</td>\n",
       "      <td>-0.088186</td>\n",
       "      <td>1.485960e+06</td>\n",
       "      <td>1.354918e+06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1082</th>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>主机</td>\n",
       "      <td>...</td>\n",
       "      <td>332.3250</td>\n",
       "      <td>37.1718</td>\n",
       "      <td>46.951212</td>\n",
       "      <td>0.141281</td>\n",
       "      <td>0.111854</td>\n",
       "      <td>4.655128e+04</td>\n",
       "      <td>4.518141e+04</td>\n",
       "      <td>-0.029427</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1083</th>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>三中心小计28家</td>\n",
       "      <td>毛利</td>\n",
       "      <td>...</td>\n",
       "      <td>639976.8436</td>\n",
       "      <td>308799.2360</td>\n",
       "      <td>332234.635056</td>\n",
       "      <td>0.519135</td>\n",
       "      <td>0.482516</td>\n",
       "      <td>8.787122e+07</td>\n",
       "      <td>8.465345e+07</td>\n",
       "      <td>-0.036619</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1084 rows × 25 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            部门      门店简称      门店类别         突击时间                 开始日期  \\\n",
       "0          总裁办    双流万达苹果         A     2.8-2.16  2023-02-08 00:00:00   \n",
       "1          总裁办    双流万达苹果         A     2.8-2.16  2023-02-08 00:00:00   \n",
       "2          总裁办    双流万达苹果         A     7.29-8.6  2023-07-29 00:00:00   \n",
       "3          总裁办    双流万达苹果         A     7.29-8.6  2023-07-29 00:00:00   \n",
       "4          总裁办   温江大南街苹果         A     2.8-2.16  2023-02-08 00:00:00   \n",
       "...        ...       ...       ...          ...                  ...   \n",
       "1079       三中心  成都高升桥二苹果        B2    11.1-11.8  2023-11-01 00:00:00   \n",
       "1080       三中心    贵阳白云苹果       A+1  11.22-11.30  2023-11-22 00:00:00   \n",
       "1081       三中心    贵阳白云苹果       A+1  11.22-11.30  2023-11-22 00:00:00   \n",
       "1082  三中心小计28家  三中心小计28家  三中心小计28家     三中心小计28家             三中心小计28家   \n",
       "1083  三中心小计28家  三中心小计28家  三中心小计28家     三中心小计28家             三中心小计28家   \n",
       "\n",
       "                     结束日期      突击天数        队长         门店全称  项目  ...  \\\n",
       "0     2023-02-16 00:00:00         9       罗江波    四川双流万达形象店  主机  ...   \n",
       "1     2023-02-16 00:00:00         9       罗江波    四川双流万达形象店  毛利  ...   \n",
       "2     2023-08-06 00:00:00         9        鲜季    四川双流万达形象店  主机  ...   \n",
       "3     2023-08-06 00:00:00         9        鲜季    四川双流万达形象店  毛利  ...   \n",
       "4     2023-02-16 00:00:00         9       王海林   四川温江大南街形象店  主机  ...   \n",
       "...                   ...       ...       ...          ...  ..  ...   \n",
       "1079  2023-11-08 00:00:00         8       孙学波  四川成都高升桥形象二店  毛利  ...   \n",
       "1080  2023-11-30 00:00:00         9        黄瑞    贵州贵阳白云形象店  主机  ...   \n",
       "1081  2023-11-30 00:00:00         9        黄瑞    贵州贵阳白云形象店  毛利  ...   \n",
       "1082             三中心小计28家  三中心小计28家  三中心小计28家     三中心小计28家  主机  ...   \n",
       "1083             三中心小计28家  三中心小计28家  三中心小计28家     三中心小计28家  毛利  ...   \n",
       "\n",
       "        突击前日均(日均)         实际增长           相对增长      相对涨幅      门店涨幅  \\\n",
       "0          7.0508       0.6159       0.485385  0.068841  0.087352   \n",
       "1      13256.3295    -195.6278    -564.640093 -0.042594 -0.014757   \n",
       "2          6.3372       1.4406       1.374492  0.216893  0.227324   \n",
       "3      12003.2374    7190.4530    7131.790956  0.594156  0.599043   \n",
       "4          6.8814      -0.5481      -0.675479 -0.098160 -0.079649   \n",
       "...           ...          ...            ...       ...       ...   \n",
       "1079   10722.4671    5755.9742    6850.187607  0.638863  0.536814   \n",
       "1080       9.3099      -1.5321      -0.618798 -0.066467 -0.164567   \n",
       "1081   16284.2056    8076.7582    9512.799651  0.584173  0.495987   \n",
       "1082     332.3250      37.1718      46.951212  0.141281  0.111854   \n",
       "1083  639976.8436  308799.2360  332234.635056  0.519135  0.482516   \n",
       "\n",
       "             体系突击前         体系突击后      大盘涨幅   体系突击前(所有门店)   体系突击后(所有门店)  \n",
       "0     7.274237e+02  7.408888e+02  0.018511  7.274237e+02  7.408888e+02  \n",
       "1     1.268725e+06  1.304042e+06  0.027837  1.268725e+06  1.304042e+06  \n",
       "2     8.305581e+02  8.392222e+02  0.010432  8.305581e+02  8.392222e+02  \n",
       "3     1.552778e+06  1.560367e+06  0.004887  1.552778e+06  1.560367e+06  \n",
       "4     7.274237e+02  7.408888e+02  0.018511  7.274237e+02  7.408888e+02  \n",
       "...            ...           ...       ...           ...           ...  \n",
       "1079  1.447695e+06  1.299960e+06 -0.102049  1.447695e+06  1.299960e+06  \n",
       "1080  7.512535e+02  6.775555e+02 -0.098100  7.512535e+02  6.775555e+02  \n",
       "1081  1.485960e+06  1.354918e+06 -0.088186  1.485960e+06  1.354918e+06  \n",
       "1082  4.655128e+04  4.518141e+04 -0.029427           NaN           NaN  \n",
       "1083  8.787122e+07  8.465345e+07 -0.036619           NaN           NaN  \n",
       "\n",
       "[1084 rows x 25 columns]"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[['部门', '门店简称', '门店类别', '突击时间', '开始日期', '结束日期', '突击天数', '队长', '门店全称']] = df_1\n",
    "# --------------------------------------------------\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "9dde5b67-399a-4b86-a727-b5a0b79a1041",
   "metadata": {},
   "outputs": [],
   "source": [
    "df[\"开始日期\"] = df[\"开始日期\"].apply(lambda x: PdFunc_Datetime_Format(x, \"%Y-%m-%d\"))\n",
    "df[\"结束日期\"] = df[\"结束日期\"].apply(lambda x: PdFunc_Datetime_Format(x, \"%Y-%m-%d\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "6c2a80f7",
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_csv(\"C:\\\\GF-Datas\\\\讯捷集团_突击数据_集团1加5精英突击前后对比_2023年02月-2023年12月.csv\", index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8f329491-8343-4f58-96f0-9d033937d758",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
